home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / misc / Resistor.lha / resistor / src / resistor_Main.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-15  |  3.7 KB  |  73 lines

  1. /*************************************************************************/
  2. /*                                                                       */
  3. /*   GUI designed with GUICreator V1.4 - © 1995 by Markus Hillenbrand    */
  4. /*                                                                       */
  5. /*************************************************************************/
  6.  
  7. char *V="$VER: resistor 1.0 (14.09.2000) © Alfred Faust Freeware";
  8.  
  9. /*************************************************************************/
  10. /*                                                                       */
  11. /*   Includes                                                            */
  12. /*                                                                       */
  13. /*************************************************************************/
  14.  
  15. #ifdef __MAXON__
  16. #include <wbstartup.h>
  17. #endif
  18. #include "resistor_Includes.h"
  19. #include "resistor.h"
  20.  
  21. /*************************************************************************/
  22. /*                                                                       */
  23. /*   Variables and Structures                                            */
  24. /*                                                                       */
  25. /*************************************************************************/
  26.  
  27. struct IntuitionBase *IntuitionBase = NULL;
  28. struct UtilityBase   *UtilityBase   = NULL;
  29. struct GfxBase       *GfxBase       = NULL;
  30. struct Library *GadToolsBase  = NULL;
  31. struct Library *AslBase       = NULL;
  32. struct Library *DataTypesBase = NULL;
  33. struct Library *TextFieldBase = NULL;
  34.  
  35. /*************************************************************************/
  36. /*                                                                       */
  37. /*   main()                                                              */
  38. /*                                                                       */
  39. /*************************************************************************/
  40.  
  41. int main (int argc, char *argv[])
  42. {
  43.         IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",39);
  44.         UtilityBase  =(struct UtilityBase   *)OpenLibrary("utility.library"  ,39);
  45.         GfxBase      =(struct GfxBase       *)OpenLibrary("graphics.library" ,39);
  46.         GadToolsBase =OpenLibrary("gadtools.library" ,39);
  47.         AslBase      =OpenLibrary("asl.library"      ,39);
  48.         DataTypesBase=OpenLibrary("datatypes.library",39);
  49.         TextFieldBase=OpenLibrary("gadgets/textfield.gadget",3);
  50.  
  51.         if (IntuitionBase && GadToolsBase && GfxBase && AslBase && DataTypesBase && UtilityBase && TextFieldBase)
  52.                 {
  53.                 struct Screen *screen;
  54.                 screen=LockPubScreen(NULL);
  55.                 if (screen)
  56.                         {
  57.                         HandleWindow(screen,-1,-1,NULL);
  58.                         UnlockPubScreen(NULL,screen);
  59.                         }
  60.                 else printf("Cannot lock screen\n");
  61.                 }
  62.         else printf("Cannot open the following libraries:\n");
  63.  
  64.         if (TextFieldBase) CloseLibrary(TextFieldBase); else printf("- Texfield.gadget   v03\n");
  65.         if (AslBase)       CloseLibrary(AslBase);       else printf("- Asl.library       v39\n");
  66.         if (GadToolsBase)  CloseLibrary(GadToolsBase);  else printf("- Gadtools.library  v39\n");
  67.         if (DataTypesBase) CloseLibrary(DataTypesBase); else printf("- Datatypes.library v39\n");
  68.         if (GfxBase)       CloseLibrary((struct Library *)GfxBase);       else printf("- Graphics.library  v39\n");
  69.         if (UtilityBase)   CloseLibrary((struct Library *)UtilityBase);   else printf("- Utility.library   v39\n");
  70.         if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase); else printf("- Intuition.library v39\n");
  71.         exit(RETURN_OK);
  72. }
  73.